import { createRouter, createWebHistory } from 'vue-router'
import Home from "../views/home.vue"
import Login from "../views/loigin.vue"
import Index from "../views/index.vue"
import Articel from '../views/article/index.vue'
import User from "../views/user/index.vue"
import Category from "../views/category/index.vue"
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home,
      children: [
        {
          path: "/",
          name: "HomeIndex",
          component: Index
        },
        {
          path: "/article",
          name: "articel",
          component: Articel,
        },
        {
          path: "/user",
          name: "user",
          component: User,
        },
        {
          path: "/cate",
          name: "category",
          component: Category,
        },
        {
          path: '/login',
          name: "Login",
          component: Login
        }
      ]
    },
  ]
})

export default router
